package cn.lili.xiaoran.entity.dtos;


import java.util.Date;

import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;
import lombok.experimental.Accessors;
import cn.lili.common.vo.PageVO;
import com.fasterxml.jackson.databind.PropertyNamingStrategy;
import com.fasterxml.jackson.databind.annotation.JsonNaming;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;

/**
 * 提问表(LiQuestionsDetail)实体类
 *
 * @author makejava
 * @since 2022-08-14 13:52:41
 */
@Data
@JsonNaming(value = PropertyNamingStrategy.SnakeCaseStrategy.class)
public class LiQuestionsDetailDTO extends PageVO {
    private static final long serialVersionUID = -91724558981829736L;
    private Integer id;
    private String createBy;
    private Date createTime;
    private Boolean deleteFlag;
    private String updateBy;
    private Date updateTime;
    private String content;
    private String createUserName;
    private String createUserHread;
    private Boolean isRenzheng;
    private Integer industryId;
    private Integer questionsId;
    private Integer parentId;
    private Integer leavel;
    private Long userId;

    public <T> QueryWrapper<T> queryWrapper() {
        QueryWrapper<T> queryWrapper = new QueryWrapper<>();
        if (id != null) {
            queryWrapper.eq("id", id);
        }
        if (createBy != null) {
            queryWrapper.eq("createBy", createBy);
        }
        if (createTime != null) {
            queryWrapper.eq("createTime", createTime);
        }
        if (deleteFlag != null) {
            queryWrapper.eq("delete_flag", deleteFlag);
        }
        if (updateBy != null) {
            queryWrapper.eq("updateBy", updateBy);
        }
        if (updateTime != null) {
            queryWrapper.eq("updateTime", updateTime);
        }
        if (content != null) {
            queryWrapper.eq("content", content);
        }
        if (createUserName != null) {
            queryWrapper.eq("createUserName", createUserName);
        }
        if (createUserHread != null) {
            queryWrapper.eq("createUserHread", createUserHread);
        }
        if (isRenzheng != null) {
            queryWrapper.eq("isRenzheng", isRenzheng);
        }
        if (industryId != null) {
            queryWrapper.eq("industry_id", industryId);
        }
        if (questionsId != null) {
            queryWrapper.eq("questions_id", questionsId);
        }
        if (parentId != null) {
            queryWrapper.eq("parent_id", parentId);
        }
        if (leavel != null) {
            queryWrapper.eq("leavel", leavel);
        }
        if (userId != null) {
            queryWrapper.eq("user_id", userId);
        }
        return queryWrapper;
    }
}

